package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import com.atguigu.eduservice.client.impl.VodFileDegradeFiengClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: 孟繁钦
 * @createDate: 2021-12-30 22:14
 * @description: 调用生产者方法
 */
//调用出现问题有实现类执行
@FeignClient(name = "service-vod",fallback = VodFileDegradeFiengClient.class)//?调用服务的名称
@Component
public interface VodClient {
    //!定义调用方法的路径 跟service_vo 请求完全路径一致 一定写上路径参数!
    @DeleteMapping("/eduvod/video/{videoId}")
    R removeVideo(@PathVariable("videoId") String videoId);

    //删除多个阿里云视频
    @DeleteMapping("/eduvod/video/deleteBatch")
    R deleteBatch(@RequestParam List<String> videoIdList);
}
